// #ifdef H5
import '@/static/js/pc'
// #endif

import Vue from 'vue'
import App from './App'
import uView from 'uview-ui';
import store from './store'
// 引入lodash 
import _ from 'lodash';
// 把lodash挂载在原型上面
Vue.prototype.$_ = _;

Vue.config.productionTip = false
Vue.prototype.$store = store
Vue.use(uView);

App.mpType = 'app'


Number.prototype.toFixed = function (val) {
	let number = this.valueOf();
	let precision = val;
	var _sign = number < 0 ? -1 : 1;
	precision == null ?
		0 :
		precision >= 0 ?
			Math.min(precision, 292) :
			Math.max(precision, -292);
	if (precision) {
		let pair = `${number}e`.split("e");
		const value =
			Math.round(`${pair[0] * _sign}e${+pair[1] + precision}`) * _sign;

		pair = `${value}e`.split("e");
		return +`${pair[0]}e${+pair[1] - precision}`;
	}
	return Math.round(number);
};


const app = new Vue({
	store,
	...App
})

app.$mount()
